package com.ctvit.sjk.knowledge.problem.pojo.dto;

import com.ctvit.sjk.knowledge.problem.pojo.domain.TabProblem;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.time.LocalDateTime;

/**
 * 问题查询VO
 *
 * @author heyingcheng
 * @date 2025/3/28
 */
@Getter
@Setter
@ToString
public class ProblemGetVO {

    private String id;
    @JsonProperty("dataset_id")
    private String datasetId;
    private String content;
    @JsonProperty("paragraph_count")
    private Integer paragraphCount;
    private Integer hitNum;
    @JsonProperty("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;
    @JsonProperty("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;

    public ProblemGetVO(TabProblem entity) {
        this.id = entity.getProblemId();
        this.datasetId = entity.getDatasetId();
        this.content = entity.getProblemContent();
        this.hitNum = entity.getHitNum();
        this.paragraphCount = entity.getParagraphCount();
        this.createTime = entity.getCreateTime();
        this.updateTime = entity.getUpdateTime();
    }

}
